// Overloading of constructor

#include <iostream>
using namespace std;


class Human {
	public:
		/*Human( ) {
			cout << "1.Human( )-->";
			age = 0;
			name = "wuming";
		}
		Human( int age ) {
			cout << "2.Human( int )-->";
			this->age = age;
			name = "wuming";
		}*/
		Human( int age=0, const char* name="wuming" ) {
			cout << "3.Human( int, const char* )-->";
			this->age = age;
			this->name = name;
		}
		void getinfo( ) {
			cout << "name : " << name << endl;
			cout << "age : " << age << endl;
		}
	private:
		int age;
		string name;
};

// designer
// ------------------------------------------------------------------
// user

int main( void ) { 
	Human h;
	h.getinfo( );

	Human h2( 22 );
	h2.getinfo( );

	Human h3( 30, "zhangfei" );
	h3.getinfo( );

	return 0;
}

